package apiday03.homework;

import java.util.HashMap;
import java.util.Map;

public class MapDemo2 {
    public static void main(String[] args) {
        Map<String,Integer> map = new HashMap<>();
        map.put("语文",99);
        map.put("数学",95);
        map.put("物理",85);
        map.put("政治",88);
        map.put("英语",68);
        System.out.println(map);

        System.out.println(map.get("语文"));
        System.out.println(map.get("体育"));
        System.out.println(map.size());
        System.out.println(map.isEmpty());
        System.out.println(map.containsKey("语文"));
        System.out.println(map.containsValue(100));//false
        System.out.println(map.remove("英语"));
        System.out.println(map.remove("体育"));
        System.out.println(map);
        map.clear();
        System.out.println(map);

    }
}
